import { createRouter, createWebHistory } from 'vue-router'
import Index from '../views/index/index.vue'
import Home from '../views/home/index.vue'
import Login from '../views/login/index.vue'
import Message from '../views/message/index.vue'
import Record from '../views/record/index.vue'
import User from '../views/user/index.vue'
import Account from '../views/account/index.vue'
import Question from '../views/question/index.vue'
import City from '../views/city/index.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: Index,
      redirect: '/home',
      children: [
        { path: '/home', component: Home },
        { path: '/message', component: Message },
        { path: '/record', component: Record },
        { path: '/user', component: User },
        { path: '/account', component: Account },
        { path: '/question', component: Question },
        { path: '/city', component: City }
      ]
    },
    {
      path: '/login',
      component: Login
    }

  ]
})

export default router
